Skip to content

Add description support for record type messages #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 14, 2020

Conversation

ixzzd
Copy link
Contributor

@ixzzd ixzzd commented Nov 9, 2020

We at @ahrefs use have use messages descriptions quite often, and lack of description support was the blocker to migrate from object message type to record.

In this PR I propose to pass message descriptions to records with [@intl.description ...] annotation, ex:

let msg = [@intl.description "Description for message"] {id: "i.am.id", defaultMessage: "i.am.defaultMessage"};

In this case, only the extractor aware of message description, and we don't have to deal with {... description: None}, {... description: Some("description")} in the records, as we discussed before
cc @cknitt

@cknitt
Copy link
Member

cknitt commented Nov 12, 2020

Thanks a lot for the PR! 😀 I like this idea! Could you also update the documentation in README.md accordingly?

/cc @alexfedoseev (FYI)

@ixzzd
Copy link
Contributor Author

ixzzd commented Nov 13, 2020

@cknitt I added an example to the documentation

@cknitt
Copy link
Member

cknitt commented Nov 14, 2020

Thanks again for your contribution! 👍

@cknitt cknitt merged commit 800723f into cca-io:master Nov 14, 2020
@alex35mil
Copy link
Collaborator

Looking great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants